package de.paulzerr;
import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.TextView;
import example.database.DBConnector;

public class GameMain extends Activity {
	private WordsData wordsData;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);   
        wordsData = new WordsData(this);
        try{    
        	DBConnector db = new DBConnector(wordsData,this);
        	db.addWordIntoDatabase();
        	Cursor cursor = db.getWordsFromDatabase();
        	
        	
        	TextView textView = (TextView) findViewById(R.id.text);
			textView.setText(db.getWordsFromDatabase(cursor));
        }finally{
        	wordsData.close();
        }        
    }


    
   
}